.PHONY: nothing OMCC flex

nothing:

LexerModelicaDiff.mo: lexerModelicaDiff.l OMCC/OMCC
	test ! -f OMCC/LexerModelicaDiff.mo || rm OMCC/LexerModelicaDiff.mo
	cp lexerModelicaDiff.l OMCC/
	cd OMCC && ./OMCC --lexer-only ModelicaDiff
	mv OMCC/LexerModelicaDiff.mo "$@"
LexerJSON.mo: lexerJSON.l OMCC/OMCC
	test ! -f OMCC/LexerJSON.mo || rm OMCC/LexerJSON.mo
	cp lexerJSON.l OMCC/
	cd OMCC && ./OMCC --lexer-only JSON
	mv OMCC/LexerJSON.mo "$@"
OMCC/OMCC:
	test -e OMCC/.git || git clone https://github.com/OpenModelica/OpenModelica-OMCC OMCC
	cd OMCC && git fetch && git pull --ff-only
	$(MAKE) -C OMCC omcc OMC="@OMBUILDDIR@/bin/omc"
flex:
	cd ../../3rdParty/flex-2.5.35 && ./autogen.sh && ./configure && $(MAKE) && cp ./flex "@OMBUILDDIR@/bin/flex"
Makefile: Makefile.in
	cd @top_builddir@ && ./config.status
